package com.handlemvc.mhc.service.impl;

import com.handlemvc.mhc.model.UserModel;
import com.handlemvc.mhc.service.UserService;
import com.handlemvc.springmvc.annotation.Service;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ：tiger.
 * @date ：2021/10/12 23:50
 */
@Service("userService")
@Slf4j
public class UserServiceImpl implements UserService {
	@Override
	public UserModel findUser(String username) {
		log.info("userService findUser [{}]",username);
		return new UserModel("1",username,28);
	}

	@Override
	public List<UserModel> getUsers() {
		List<UserModel> users = new ArrayList<>();
		users.add(new UserModel("1", "tiger", 28));
		users.add(new UserModel("2", "leah", 29));
		return users;
	}
}
